package front.grails.com

import com.bussiness.dangnhap.LoginDAS
import com.bussiness.entity.DangNhaps;


class LoginController {
	def loginDAS = new LoginDAS();
    def index() { 
		
		/*LoginDAS login123 = new LoginDAS()*/
		 
		/*boolean check = login123.checkLogin("admin435", "admin");
		if (check == true ){
			System.out.println("Success");
		}
		else {
			System.out.println("Faild");
		}
	    */
	}
	
	def checklogin(){
		 
		if (loginDAS.checkLogin(params["username"], params["password"])){
			redirect(controller: "dashboard")
		}
		else {
			redirect(controller:"login")
		}
		
	}
	
}
